Support for iGo Primo POI (.upoi) format. Conversion FROM upoi to other formats is...
authorScott Bradford <scott@scottbradford.us>
Sun, 27 Mar 2016 17:52:15 +0000 (13:52 -0400)
committerScott Bradford <scott@scottbradford.us>
Sun, 27 Mar 2016 17:52:15 +0000 (13:52 -0400)
internal_styles.cc
style/igoprimo_poi.style [new file with mode: 0644]
testo.d/igoprimo_poi.test [new file with mode: 0644]
xmldoc/formats/igoprimo_poi.xml [new file with mode: 0644]

index 1eb9408b9e4216713e75c5b0d15a9379cda2a2af..0d2ef31e187033f107155ec5c5f87e876b3b72c9 100644 (file)
@@ -734,6 +734,45 @@ static char igo2008_poi[] =
   "IFIELD      NOTES, \"\", \"%s\"\n"
   "IFIELD      PHONE_NR, \"\", \"%s\"\n"
   ;
+static char igoprimo_poi[] =
+  "# gpsbabel XCSV style file\n"
+  "#\n"
+  "# Format: iGo Primo points of interest\n"
+  "# Author: Scott Bradford\n"
+  "#   Date: 03/26/2016\n"
+  "#\n"
+  "DESCRIPTION         iGo Primo points of interest (.upoi)\n"
+  "EXTENSION           upoi\n"
+  "DATATYPE            WAYPOINT\n"
+  "#\n"
+  "# FILE LAYOUT DEFINITIONS:\n"
+  "#\n"
+  "FIELD_DELIMITER             PIPE\n"
+  "RECORD_DELIMITER    CR\n"
+  "BADCHARS            \"|\n"
+  "ENCODING            windows-1252\n"
+  "#\n"
+  "# INDIVIDUAL DATA FIELDS, IN ORDER OF APPEARANCE:\n"
+  "#\n"
+  "IFIELD      INDEX, \"1\", \"%d\"\n"
+  "IFIELD  CONSTANT, \"@Favourites\", \"%s\"   # always @Favourites?\n"
+  "IFIELD      SHORTNAME, \"\", \"%s\"\n"
+  "IFIELD      IGNORE, \"\", \"%s\"                            # always empty?\n"
+  "IFIELD      LAT_DECIMAL, \"\", \"%.6f\"\n"
+  "IFIELD      LON_DECIMAL, \"\", \"%.6f\"\n"
+  "IFIELD  CONSTANT, \"_u**\", \"%s\"                  # always _u**?\n"
+  "IFIELD      IGNORE, \"\", \"%s\"                            # always empty?\n"
+  "IFIELD  CONSTANT, \"_uva\", \"%s\"                  # always _uva?\n"
+  "IFIELD      IGNORE, \"\", \"%s\"                            # always empty?\n"
+  "IFIELD      POSTAL_CODE, \"\", \"%s\"\n"
+  "IFIELD      CITY, \"\", \"%s\"\n"
+  "IFIELD      STREET_ADDR, \"\", \"%s\"                       # should be street name (no number)\n"
+  "IFIELD      IGNORE, \"\", \"%s\"                            # should be street number\n"
+  "IFIELD      IGNORE, \"\", \"%s\"                            # always empty?\n"
+  "IFIELD      PHONE_NR, \"\", \"%s\"\n"
+  "IFIELD      IGNORE, \"\", \"%s\"                            # always empty?\n"
+  "IFIELD      IGNORE, \"\", \"%s\"                            # seems to be extra lat/lon values?\n"
+  ;
 static char kompass_tk[] =
   "# gpsbabel XCSV style file\n"
   "#\n"
@@ -1450,7 +1489,7 @@ static char xmapwpt[] =
   "IFIELD      IGNORE, \"\", \"%-.31s\"\n"
   "IFIELD      DESCRIPTION, \"\", \"%-.78s\"\n"
   ;
-style_vecs_t style_list[] = {{ "xmapwpt", xmapwpt } , { "xmap2006", xmap2006 } , { "xmap", xmap } , { "tomtom_itn_places", tomtom_itn_places } , { "tomtom_itn", tomtom_itn } , { "tomtom_asc", tomtom_asc } , { "tabsep", tabsep } , { "saplus", saplus } , { "s_and_t", s_and_t } , { "ricoh", ricoh } , { "openoffice", openoffice } , { "nima", nima } , { "navigonwpt", navigonwpt } , { "mxf", mxf } , { "motoactv", motoactv } , { "mapconverter", mapconverter } , { "mainnav", mainnav } , { "land_air_sea", land_air_sea } , { "kompass_wp", kompass_wp } , { "kompass_tk", kompass_tk } , { "igo2008_poi", igo2008_poi } , { "iblue757", iblue757 } , { "iblue747", iblue747 } , { "gpsman", gpsman } , { "gpsdrivetrack", gpsdrivetrack } , { "gpsdrive", gpsdrive } , { "geonet", geonet } , { "garmin_poi", garmin_poi } , { "garmin_g1000", garmin_g1000 } , { "garmin301", garmin301 } , { "fugawi", fugawi } , { "flysight", flysight } , { "dna", dna } , { "custom", custom } , { "cup", cup } , { "csv", csv } , { "cambridge", cambridge } , { "arc", arc } ,  {0,0}};
+style_vecs_t style_list[] = {{ "xmapwpt", xmapwpt } , { "xmap2006", xmap2006 } , { "xmap", xmap } , { "tomtom_itn_places", tomtom_itn_places } , { "tomtom_itn", tomtom_itn } , { "tomtom_asc", tomtom_asc } , { "tabsep", tabsep } , { "saplus", saplus } , { "s_and_t", s_and_t } , { "ricoh", ricoh } , { "openoffice", openoffice } , { "nima", nima } , { "navigonwpt", navigonwpt } , { "mxf", mxf } , { "motoactv", motoactv } , { "mapconverter", mapconverter } , { "mainnav", mainnav } , { "land_air_sea", land_air_sea } , { "kompass_wp", kompass_wp } , { "kompass_tk", kompass_tk } , { "igo2008_poi", igo2008_poi } , { "igoprimo_poi", igoprimo_poi } , { "iblue757", iblue757 } , { "iblue747", iblue747 } , { "gpsman", gpsman } , { "gpsdrivetrack", gpsdrivetrack } , { "gpsdrive", gpsdrive } , { "geonet", geonet } , { "garmin_poi", garmin_poi } , { "garmin_g1000", garmin_g1000 } , { "garmin301", garmin301 } , { "fugawi", fugawi } , { "flysight", flysight } , { "dna", dna } , { "custom", custom } , { "cup", cup } , { "csv", csv } , { "cambridge", cambridge } , { "arc", arc } ,  {0,0}};
 size_t nstyles = 38;
 #else /* CSVFMTS_ENABLED */
 style_vecs_t style_list[] = {{0,0}};
diff --git a/style/igoprimo_poi.style b/style/igoprimo_poi.style
new file mode 100644 (file)
index 0000000..3140a2d
--- /dev/null
@@ -0,0 +1,37 @@
+# gpsbabel XCSV style file
+#
+# Format: iGo Primo points of interest
+# Author: Scott Bradford
+#   Date: 03/26/2016
+#
+DESCRIPTION            iGo Primo points of interest (.upoi)
+EXTENSION              upoi
+DATATYPE               WAYPOINT
+#
+# FILE LAYOUT DEFINITIONS:
+#
+FIELD_DELIMITER                PIPE
+RECORD_DELIMITER       CR
+BADCHARS               "|
+ENCODING               windows-1252
+#
+# INDIVIDUAL DATA FIELDS, IN ORDER OF APPEARANCE:
+#
+IFIELD INDEX, "1", "%d"
+IFIELD  CONSTANT, "@Favourites", "%s"  # always @Favourites?
+IFIELD SHORTNAME, "", "%s"
+IFIELD IGNORE, "", "%s"                                # always empty?
+IFIELD LAT_DECIMAL, "", "%.6f"
+IFIELD LON_DECIMAL, "", "%.6f"
+IFIELD  CONSTANT, "_u**", "%s"                 # always _u**?
+IFIELD IGNORE, "", "%s"                                # always empty?
+IFIELD  CONSTANT, "_uva", "%s"                 # always _uva?
+IFIELD IGNORE, "", "%s"                                # always empty?
+IFIELD POSTAL_CODE, "", "%s"
+IFIELD CITY, "", "%s"
+IFIELD STREET_ADDR, "", "%s"                   # should be street name (no number)
+IFIELD IGNORE, "", "%s"                                # should be street number
+IFIELD IGNORE, "", "%s"                                # always empty?
+IFIELD PHONE_NR, "", "%s"
+IFIELD IGNORE, "", "%s"                                # always empty?
+IFIELD IGNORE, "", "%s"                                # seems to be extra lat/lon values?
\ No newline at end of file
diff --git a/testo.d/igoprimo_poi.test b/testo.d/igoprimo_poi.test
new file mode 100644 (file)
index 0000000..20ff020
--- /dev/null
@@ -0,0 +1,8 @@
+#
+# igoprimo_poi
+#
+gpsbabel -i igoprimo_poi -f ${REFERENCE}/igoprimo_poi.upoi -o gpx -F ${TMPDIR}/igoprimo_poi~upoi.gpx
+compare ${REFERENCE}/igoprimo_poi~upoi.gpx ${TMPDIR}/igoprimo_poi~upoi.gpx
+gpsbabel -i igoprimo_poi -f ${REFERENCE}/igoprimo_poi.upoi -o unicsv -F ${TMPDIR}/igoprimo_poi~upoi.csv
+compare ${REFERENCE}/igoprimo_poi~upoi.csv ${TMPDIR}/igoprimo_poi~upoi.csv
+
diff --git a/xmldoc/formats/igoprimo_poi.xml b/xmldoc/formats/igoprimo_poi.xml
new file mode 100644 (file)
index 0000000..c5ffa7d
--- /dev/null
@@ -0,0 +1,5 @@
+<para>
+   igoprimo_poi supports POI files from <productname>iGo Primo</productname> 'next generation
+   navigation' devices. iGo Primo is GPS Navigation Software that runs on Windows embedded
+   platforms, and is used in some OEM and aftermarket automotive head units.
+</para>